package com.test.thread;

public class ThreadDemo {
    public static void main(String[] args) {
        Thread testThread = new Thread(()->{
            System.out.println("testThread当前线程组名字："+Thread.currentThread().getThreadGroup().getName());
            System.out.println("testThread线程名字："+Thread.currentThread().getName());

        }
        );
        testThread.setPriority(10);
        testThread.start();
        System.out.println("testThread线程优先级："+testThread.getPriority());
        System.out.println("main方法所在线程组："+Thread.currentThread().getThreadGroup().getName());
        System.out.println("main方法线程名字："+Thread.currentThread().getName());
        System.out.println("main方法线程优先级："+Thread.currentThread().getPriority());

    }
}
